Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add audio file detection by magic numbers #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wangsrGit119
Copy link
Contributor

Add audio file detection by magic numbers

Add audio file detection by magic numbers

Changes

  • Add is_audio_file() function to detect audio files by checking file headers
  • Support WAV, FLAC, MP3, M4A/AAC formats
  • Replace extension-based detection with content-based detection in read_and_config_file()

Why

More reliable audio file detection without relying on file extensions

Test

  • Tested with various audio formats (WAV, MP3)

 Add audio file detection by magic numbers
# Add audio file detection by magic numbers

## Changes
- Add `is_audio_file()` function to detect audio files by checking file headers
- Support WAV, FLAC, MP3, M4A/AAC formats
- Replace extension-based detection with content-based detection in `read_and_config_file()`

## Why
More reliable audio file detection without relying on file extensions

## Test
- Tested with various audio formats (WAV, MP3)
@zexupan
Copy link
Collaborator

zexupan commented Dec 11, 2024

Can you please test all formats? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants